﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KMrpt2.aspx.cs" Inherits="KMrpt2"
    EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>周销存结构（店）</title>
    <link href="css/global.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery/jquery-1.8.1.min.js" type="text/javascript"></script>
    <script src="My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="js/msgbox.js" type="text/javascript"></script>
    <link href="css/msgsty.css" rel="stylesheet" type="text/css" />
    <script src="js/main.js" type="text/javascript"></script>
    <script src="js/config.js" type="text/javascript"></script>
    <script src="js/Gvtools.js" type="text/javascript"></script>
    <script type="text/javascript">
        function funGrilViewScroll() {
            if (document.getElementById("gvTitle") == null) {
                var gdvList = document.getElementById("GridView1");
                var gdvHeader = gdvList.cloneNode(true);
                for (i = gdvHeader.rows.length - 1; i > 0; i--) {
                    gdvHeader.deleteRow(i);
                }
                document.getElementById("divTitle").appendChild(gdvHeader);

                gdvList.deleteRow(0);

                //gdvList.rows[0].style.display = 'none';
            }
        }
        $(document).ready(function () {
            SetPageBakguand($(".bg"));
            SetGvFloat("GridView1");
            $('#business').click(function () {
                lodshoplist($("#txtshopname").val());
                if ($('.shoplist').css('display') == "none") {
                    $('.shoplist').css('display', 'block');
                }
                else {
                    $('.shoplist').css('display', 'none');
                }
            });
            $('#Button1').click(function () {
                $("#loading-mask").show();
            });
            $('#Button4').click(function () {
                lodshoplist($("#txtshopname").val());
            });

            $('#chkclose').click(function () {
                $('.shoplist').css('display', 'none');
            });
            $('#chkclear').click(function () {
                $('#js_shop input[type="checkbox"]').each(function () {
                    if ($(this).attr('checked') == 'checked') {
                        $(this).click();
                    }
                });
                $('#business').val('');
            });
            $('#chkall').click(function () {
                $('#business').val("");
                $('#js_shop input[type="checkbox"]').each(function () {
                    var val = $('#business').val();
                    var chkVal = $(this).val();
                    if ($(this).attr('checked') == undefined) {
                        $(this).click();
                    }
                    $('#business').val(val + chkVal + ';');
                });
            });
        });
    </script>
    <style>
        .shoplist
        {
            width: 350px;
            display: none;
            border: 1px solid #ccd6de;
            position: fixed;
            z-index: 999;
            background-color: White;
            padding: 5px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="rptTitle">
            <b>周销存结构（店）</b>
        </div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="param_div">
            <div class="input-group">
                <span class="input-group-addon">开始日期：</span>
                <asp:TextBox ID="txtsdate" runat="server" class="form-control" placeholder="开始日期"
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">结束日期：</span>
                <asp:TextBox ID="txtedate" runat="server" class="form-control" placeholder="结束日期"
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">省&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 份：</span>
                <asp:TextBox ID="txtbigarea" runat="server" class="form-control" placeholder="省份"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">城&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 市：</span>
                <asp:TextBox ID="txtarea" runat="server" class="form-control" placeholder="城市"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">店&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 铺：</span>
                <asp:TextBox ID="business" class="form-control" runat="server" placeholder="输入店铺名称"></asp:TextBox>
                <div class="shoplist" runat="server" id="shoplist">
                    <div style="color: Gray;">
                        <span>提示：不选择店铺查询全部数据</span></div>
                    <div style="text-align: right; color: Blue; font-size: smaller;">
                        <span><a id="chkall" href="#">全选</a></span> <span><a id="chkclear" href="#">清除</a></span>
                        <span><a id="chkclose" href="#">关闭</a></span></div>
                    <div>
                        模糊查找：<asp:TextBox ID="txtshopname" runat="server"></asp:TextBox>
                        <input id="Button4" type="button" value="查找" />
                    </div>
                    <div id="js_shop" style="overflow: auto; height: 300px; border: 1px solid #ccd6de;">
                        <asp:CheckBoxList ID="chkblist" CssClass="slOption" runat="server">
                            <%--<asp:ListItem Value="0" Text="0"></asp:ListItem>--%>
                        </asp:CheckBoxList>
                    </div>
                </div>
            </div>
            <div class="input-group">
                <asp:CheckBox ID="CheckBox1" runat="server" Text="是否含在途" />
            </div>
            <div class="input-group">
                <%-- <a href="#" class="btn btn-info btn-lg btn-animate-demo">查询</a>--%>
                <asp:Button ID="Button1" runat="server" Text="查询" class="btn btn-info btn-lg btn-animate-demo"
                    OnClick="Button1_Click" />
                <asp:Button ID="Button2" runat="server" Text="导出EXCEL" class="btn btn-info btn-lg btn-animate-demo"
                    OnClick="Button2_Click" />
                <%--<input id="btnfind" type="button" value="查询"  class="btn btn-info btn-lg btn-animate-demo"/>--%>
            </div>
        </div>
        <div class="grid_div">
            <div class="mycss" id="divGvData" runat="server" style="position: relative; top: 0px;
                left: 0px; width: 100%;" onscroll="funGrilViewScroll(); return false;">
                <div class="bg div_center">
                </div>
                <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CCCCCC"
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal"
                    Width="70%" AutoGenerateColumns="False" EmptyDataText="暂无数据" ShowHeaderWhenEmpty="True"
                    PageSize="100" OnPageIndexChanging="GridView1_PageIndexChanging">
                    <Columns>
                        <asp:BoundField HeaderText="省份" DataField="bigarea">
                            <HeaderStyle Width="50px" />
                            <ItemStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="城市" DataField="areaname">
                            <HeaderStyle Width="50px" />
                            <ItemStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="店铺代码" DataField="shopcode">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="店铺简称" DataField="shopname">
                            <HeaderStyle Width="150px" />
                            <ItemStyle Width="150px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="货品简称" DataField="MATERIALSHORTNAME">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="本日存数" DataField="invqty">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="近7天累销数" DataField="qty">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="流转周" DataField="lzv">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F7F7F7" />
                    <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                    <SortedDescendingCellStyle BackColor="#E5E5E5" />
                    <SortedDescendingHeaderStyle BackColor="#242121" />
                </asp:GridView>
            </div>
        </div>
    </div>
    <div class="zeng_msgbox_layer_wrap" id="q_Msgbox" style="top: 109px; display: none;">
        <span class="zeng_msgbox_layer" style="z-index: 10000;" id="mode_tips_v2"><span class="gtl_ico_clear">
        </span><span class="gtl_ico_loading"></span>正在加载中，请稍后...<span class="gtl_end"></span></span></div>
    <div id='loading-mask'>
        <div id="loading">
            <div class="loading-indicator">
                <img src="images/0504317.gif" width="48" height="48" style="margin-right: 8px;" />
                <br />
                <span id="loading-msg">数据加载中...</span>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
